package org.seedltd.upms.model.detection.form;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import org.seedltd.core.validation.Save;
import org.seedltd.core.validation.Update;

import lombok.Getter;
import lombok.Setter;

/**
 *
 * 检测结果模板表单
 * 
 * @author laizuan
 * @version 1.0
 * @since 2021/08/30
 */
@Getter
@Setter
public class DetectionCheckTemplateForm {

    /**
     * 主键
     */
    @NotNull(message = "修改数据ID不能为空，请重新进入操作页面。", groups = {Update.class})
    private Long id;

    /**
     * 标签
     */
    @Length(message = "标签长度不能超过20个字符", max = 20, groups = {Save.class})
    @NotBlank(message = "标签不能为空", groups = {Save.class})
    private String tag;

    /**
     * 模板内容
     */
    @Length(message = "模板内容长度不能超过255个字符", max = 255, groups = {Save.class})
    @NotBlank(message = "模板内容不能为空", groups = {Save.class})
    private String content;

}
